import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/home/Home'
import UserCenter from '@/components/user/UserCenter'

import RotationChart from '@/components/chart/RotationChart'

import Subject from '@/components/course/Subject'
import CourseDetails from '@/components/course/CourseDetails'
import Question from '@/components/question/Question'

import Navigation from '@/components/nav/Navigation'

import User from '@/components/sys/User'
import Role from '@/components/sys/Role'
import Menu from '@/components/sys/Menu'
import File from '@/components/file/File'

Vue.use(VueRouter)

const routes = [
    {path: '/', name: 'Home', component: Home},
    {path: '/userCenter', name: 'UserCenter', component: UserCenter},
    {path: '/rotationChart', name: 'RotationChart', component: RotationChart},

    //课程
    {path: '/subject', name: 'Subject', component: Subject},
    {path: '/courseDetails', name: 'CourseDetails', component: CourseDetails},
    {path: '/question', name: 'Question', component: Question},

    //导航
    {path: '/navigation', name: 'Navigation', component: Navigation},

    //系统设置
    {path: '/user', name: 'User', component: User},
    {path: '/role', name: 'Role', component: Role},
    {path: '/menu', name: 'Menu', component: Menu},
    {path: '/file', name: 'File', component: File},

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
